const install = (Vue, vm) => {
	vm.$u.api = {
		// 首页分类
		getHomeClassify:(params ={}) => vm.$u.post('/api/index/getHomeClassify',params),
		// 首页自定义标题
		getHomeSet:(params ={}) => vm.$u.post('/api/housebaseset/getConfigSet',params),
		// 推荐新房
		getNewhouse:(params ={}) => vm.$u.post('/api/index/getNewhouse',params),
		// 推荐二手房
		getSecondHandHouse:(params ={}) => vm.$u.post('/api/index/getSecondHandHouse',params),
		// 推荐租房
		getRentHouse:(params ={}) => vm.$u.post('/api/index/rentHouse',params),
		// 热门新房
		getHotNewhouse:(params ={}) => vm.$u.post('/api/index/getHotNewhouse',params),
		// 热门租房
		getHotSecondHandHouse:(params ={}) => vm.$u.post('/api/index/getHotSecondHandHouse',params),
		
		// 新闻资讯
		newsType:(params ={}) => vm.$u.post('/api/news/type',params),
		newsList:(params ={}) => vm.$u.post('/api/news/index',params),
		newsDetail:(params ={}) => vm.$u.post('/api/news/details',params),
		
		// 新房板块
		newhouse:{
			banner:(params ={}) => vm.$u.post('/api/newhouse/banner',params),
			index:(params ={}) => vm.$u.post('/api/newhouse/index',params),
			type:(params ={}) => vm.$u.post('/api/newhouse/type',params),
			detail:(params ={}) =>vm.$u.post('/api/newhouse/details',params)
		},
		// 二手房
		secondhandhouse:{
			banner:(params ={}) => vm.$u.post('/api/secondhandhouse/banner',params),
			index:(params ={}) => vm.$u.post('/api/secondhandhouse/index',params),
			type:(params ={}) => vm.$u.post('/api/secondhandhouse/type',params),
			detail:(params ={}) =>vm.$u.post('/api/secondhandhouse/details',params)
		},
		// 商铺
		shops:{
			banner:(params ={}) => vm.$u.post('/api/shops/banner',params),
			index:(params ={}) => vm.$u.post('/api/shops/index',params),
			type:(params ={}) => vm.$u.post('/api/shops/type',params),
			detail:(params ={}) =>vm.$u.post('/api/shops/details',params)
		},
		// 租房板块
		renthouse:{
			banner:(params ={}) => vm.$u.post('/api/renthouse/banner',params),
			index:(params ={}) => vm.$u.post('/api/renthouse/index',params),
			type:(params ={}) => vm.$u.post('/api/renthouse/type',params),
			detail:(params ={}) =>vm.$u.post('/api/renthouse/details',params),
			payType:(params ={}) =>vm.$u.post('/api/renthouse/paymethod',params),
			price:(params ={}) =>vm.$u.post('/api/renthouse/price',params),
			// 配套设施
			supportingfacilities:(params ={}) =>vm.$u.post('/api/renthouse/supportingfacilities',params),
		},
		// 地皮
		land:{
			banner:(params ={}) => vm.$u.post('/api/land/banner',params),
			index:(params ={}) => vm.$u.post('/api/land/index',params),
			type:(params ={}) => vm.$u.post('/api/land/type',params),
			detail:(params ={}) =>vm.$u.post('/api/land/details',params)
		},
		// 独栋楼
		singlebuilding:{
			banner:(params ={}) => vm.$u.post('/api/singlebuilding/banner',params),
			index:(params ={}) => vm.$u.post('/api/singlebuilding/index',params),
			type:(params ={}) => vm.$u.post('/api/singlebuilding/type',params),
			detail:(params ={}) =>vm.$u.post('/api/singlebuilding/details',params)
		},
		// 厂房
		plant:{
			banner:(params ={}) => vm.$u.post('/api/factorybuilding/banner',params),
			index:(params ={}) => vm.$u.post('/api/factorybuilding/index',params),
			detail:(params ={}) =>vm.$u.post('/api/factorybuilding/details',params)
		},
		// 获取用户信息
		getUserInfo:(params ={}) =>vm.$u.post('/api/user/index',params),
		// 关注房源
		followHouse:(params ={}) =>vm.$u.post('/api/user/setFollowHouse',params),
		
		// 协议
		contract:(params ={}) =>vm.$u.post('/api/contract/index',params),
		contractDetails:(params ={}) =>vm.$u.post('/api/contract/details',params),
		
		
		upload:(params ={}) =>vm.$u.post('/api/common/upload',params),
		uploadUrl:()=>vm.$u.http.config.baseUrl + '/api/common/upload',
		
		
		// 地址区域配置
		getAddressConfig:(params ={}) => vm.$u.post('/api/housebaseset/getCity',params),
		// 价格配置
		getPriceConfig:(params ={}) => vm.$u.post('/api/housebaseset/price',params),
		// 基础配置，vuex实现
		com_features:(params ={}) => vm.$u.post('/api/housebaseset/features',params),
		com_housetype:(params ={}) => vm.$u.post('/api/housebaseset/housetype',params),
		com_decorationtype:(params ={}) => vm.$u.post('/api/housebaseset/decorationtype',params),
		com_propertytype:(params ={}) => vm.$u.post('/api/housebaseset/propertytype',params),
		com_orientation:(params ={}) => vm.$u.post('/api/housebaseset/orientation',params),
		com_area:(params ={}) => vm.$u.post('/api/housebaseset/area',params),
		// 利率计算
		interestrate:(params = {}) => vm.$u.post('/api/housebaseset/interestrate',params)
	}
}

export default {
	install
}